﻿@model IEnumerable<WebVideo.EntityChat>
@{
    foreach (var item in Model)
    {
        if (item.UserName != Request.Cookies["UserId"].Value)
        {
            <div class="media">
                <div class="pull-left" style="width: 34px;">
                    @{if (item.EntityUser.Avatar == null)
                      {
                        <img class="media-object" src="/Content/Images/Avatar/AdminAvatar.jpg" alt="" style="width: 34px; height: 34px;" />
                      }
                      else
                      {
                        <img class="media-object" src="/Content/Images/Avatar/@item.EntityUser.Avatar" alt="" style="width: 34px; height: 34px;" />
                      }
                  
                    }
                </div>
                <div class="media-body">
                    <h5 class="media-heading">@item.UserName</h5>
                    @item.Contents
                </div>
            </div>
        }
        else
        {
            <div class="media">
                <div class="pull-left" style="width: 34px;">
                    @{if (item.EntityUser.Avatar == null)
                      {
                        <img class="media-object" src="/Content/Images/Avatar/AdminAvatar.jpg" alt="" style="width: 34px; height: 34px;" />
                      }
                      else
                      {
                        <img class="media-object" src="/Content/Images/Avatar/@item.EntityUser.Avatar" alt="" style="width: 34px; height: 34px;" />
                      }
                  
                    }
                </div>
                <div class="media-body">
                    <h5 class="media-heading">@item.UserName</h5>
                    @item.Contents
                </div>
            </div>
        }
    }
}